<!doctype html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Polymer后台管理系统</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/amazeui.min.css') }}" />
    <link rel="stylesheet" href="{{ url_for('static', filename='css/admin.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/app.css') }}">
</head>

<body data-type="index">
    <header class="am-topbar am-topbar-inverse admin-header">
        <div class="am-topbar-brand">
            <a href="javascript:" class="tpl-logo">
                <img src="{{ url_for('static', filename='img/logo.png') }}" alt="">
            </a>
        </div>
        <div class="am-icon-list tpl-header-nav-hover-ico am-fl am-margin-right">

        </div>

        <button class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-success am-show-sm-only" data-am-collapse="{target: '#topbar-collapse'}"><span class="am-sr-only">导航切换</span> <span class="am-icon-bars"></span></button>

    </header>

    <div class="tpl-page-container tpl-page-header-fixed">
        <!--NavBar开始-->
        <div class="tpl-left-nav tpl-left-nav-hover">
            <div class="tpl-left-nav-list">
                <ul class="tpl-left-nav-menu">
                    <li class="tpl-left-nav-item">
                        <a href="{{ url_for('admin.index') }}" class="nav-link{% if request.endpoint and request.endpoint == 'admin.index' %} active{% endif %}">
                            <i class="am-icon-home"></i>
                            <span>首页</span>
                        </a>
                    </li>

                    <li class="tpl-left-nav-item">
                        <a href="{{ url_for('admin.user') }}" class="nav-link tpl-left-nav-link-list{% if request.endpoint and request.endpoint == 'admin.user' %} active{% endif %}">
                            <i class="am-icon-user"></i>
                            <span>用户管理</span>

                        </a>
                    </li>

                    <li class="tpl-left-nav-item">
                        <a href="{{ url_for('admin.category') }}" class="nav-link tpl-left-nav-link-list{% if request.endpoint and request.endpoint == 'admin.category' %} active{% endif %}">
                            <i class="am-icon-book"></i>
                            <span>分类管理</span>

                        </a>
                    </li>

                    <li class="tpl-left-nav-item">
                        <a href="javascript:" class="nav-link tpl-left-nav-link-list{% if request.endpoint and request.endpoint.startswith('admin.crawler') %} active{% endif %}">
                            <i class="am-icon-download"></i>
                            <span>爬虫相关</span>
                            <i class="am-icon-angle-right tpl-left-nav-more-ico am-fr am-margin-right"></i>
                        </a>
                        <ul class="tpl-left-nav-sub-menu"{% if request.endpoint and request.endpoint.startswith('admin.crawler') %} style="display: block;"{% endif %}>
                            <a href="{{ url_for('admin.crawler') }}">
                                <i class="am-icon-angle-right"></i>
                                <span>爬虫管理</span>
                            </a>

                            <a href="{{ url_for('admin.crawler_add') }}">
                                <i class="am-icon-angle-right"></i>
                                <span>添加爬虫</span>
                            </a>
                        </ul>
                    </li>

                    <li class="tpl-left-nav-item">
                        <a href="{{ url_for('admin.tasks') }}" class="nav-link tpl-left-nav-link-list{% if request.endpoint and request.endpoint == 'admin.tasks' %} active{% endif %}">
                            <i class="am-icon-tasks"></i>
                            <span>任务分配</span>
                        </a>
                    </li>

                </ul>
            </div>
        </div>
        <!--NavBar结束-->
        {% block content %}{% endblock %}
    </div>
</body>

<footer>
    <script src="{{ url_for('static', filename='js/jquery.min.js') }}"></script>
    <script src="{{ url_for('static', filename='js/amazeui.min.js') }}"></script>
    <script src="{{ url_for('static', filename='js/iscroll.js') }}"></script>
    <script src="{{ url_for('static', filename='js/app.js') }}"></script>
    {% block js %}{% endblock %}
</footer>

</html>